﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity.ModelConfiguration;
using CreatureSoft.Hoot.Domain.Security;

namespace CreatureSoft.Hoot.Data.Mapping
{
    class UserMap : EntityTypeConfiguration<User>
    {
        public UserMap()
        {            
            this.HasKey(t => t.Id);            
            this.Property(t => t.Id).HasColumnName("Id");

            this.Property(t => t.UserName).HasColumnName("UserName");
            this.Property(t => t.UserName).IsRequired();

            this.Property(t => t.Password).HasColumnName("Password");
            this.Property(t => t.Password).IsRequired();

            this.ToTable("Users");
        }
    }
}
